function p = identifica( x, xm)
%	Functia care cauta numarul p astfel incat
%       x(p) < xm < x(p+1)

		p = 1;
		n = length(x);
		ok = 0;
		x1 = sort( x );
		for i = 1:n-1
			if( x1(i) < xm && xm < x1(i+1)) 
						p= x1(i);
						ok = 1;
			endif
		endfor
		p=find( x == p );
		
endfunction
